#ifndef MOCKCHANAGENT_H
#define MOCKCHANAGENT_H

#include "gmock/gmock.h"
#include "chanagents/chanagent.h"
#include "components/board.h"
#include "components/chan.h"

namespace Wishmaster
{
	class Taskhub;
	class CookieStorage;
}

namespace MockObjects
{
	class MockChanAgent : public Wishmaster::ChanAgent
	{
		typedef QMap<QString, QString> StringMap;
	public:
		MockChanAgent(const QString& host) : Wishmaster::ChanAgent(host) {}
		virtual ~MockChanAgent() {}
		MOCK_METHOD1(setTaskhub, void(Wishmaster::Taskhub*));
		MOCK_METHOD0(taskhub, Wishmaster::Taskhub*());

		MOCK_METHOD1(setRequestManager, void(Wishmaster2::Network::RequestManager* connector));
		MOCK_CONST_METHOD0(requestManager, Wishmaster2::Network::RequestManager*());

		MOCK_METHOD1(setCaptchaFetcher, void(Wishmaster::CaptchaFetcher* fetcher));
		MOCK_CONST_METHOD0(captchaFetcher, Wishmaster::CaptchaFetcher*());

		MOCK_METHOD1(getCaptcha, void(const Wishmaster::ThreadId& threadId));
		MOCK_METHOD2(makePost, void(const Wishmaster::PostDescriptor& post, const QString& captcha));
		MOCK_METHOD2(createThread, void(const Wishmaster::PostDescriptor& post, const QString& captcha));

		MOCK_METHOD0(requestFavicon, void());
		MOCK_METHOD2(requestBoardIndex, void(const QString& boardId, int page));
		MOCK_METHOD2(requestThread, void(const Wishmaster::ThreadId& threadId, const Wishmaster::PostId& lastPostId));
		MOCK_METHOD3(requestThumbnail, void(const Wishmaster::PostId& postId, int attachmentIndex, const QUrl& thumblink));
		MOCK_METHOD3(requestPic, void(const Wishmaster::PostId& postId, int attachmentIndex, const QUrl& piclink));
		MOCK_METHOD4(downloadFile, void(const Wishmaster::PostId& postId, int attachmentIndex, const QUrl& filelink, const QString& filename));

		MOCK_METHOD2(deleteThread, void(const Wishmaster::ThreadId& threadId, const QString& password));
		MOCK_METHOD2(deletePost, void(const Wishmaster::PostId& postId, const QString& password));

		MOCK_METHOD0(contentRatings, QStringList());

		MOCK_METHOD1(autodetect, bool(const QUrl& url));
		MOCK_METHOD0(autodetectedBoards, QList<Wishmaster::BoardDescriptor>());
		MOCK_METHOD0(autodetectedAgentSettings, StringMap());

		MOCK_METHOD1(clone, Wishmaster::ChanAgent*(const QString& host));
		MOCK_METHOD0(id, QString());
	};

}

#endif // MOCKCHANAGENT_H
